package com.zhang.common.core.constant;

/**
 * @Class com.zhang.common.core.constant
 * @Author zhang
 * @Date 2025/9/11 9:56
 * @Description 通用常量信息
 **/
public class Constants {

    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String GBK = "GBK";

    /**
     * RMI 远程方法调用
     */
    public static final String LOOKUP_RMI = "rmi:";

    /**
     * LDAP 远程方法调用
     */
    public static final String LOOKUP_LDAP = "ldap:";

    /**
     * LDAPS 远程方法调用
     */
    public static final String LOOKUP_LDAPS = "ldaps:";

    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";

    /**
     * 成功标记
     */
    public static final Integer SUCCESS = 200;

    /**
     * 失败标记
     */
    public static final Integer FAIL = 500;

    /**
     * 登录成功状态
     */
    public static final String LOGIN_SUCCESS_STATUS = "0";

    /**
     * 登录失败状态
     */
    public static final String LOGIN_FAIL_STATUS = "1";

    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 注册
     */
    public static final String REGISTER = "Register";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 登录系统类型-后台
     */
    public static final String LOGIN_TYPE_SYSTEM = "SYSTEM";

    /**
     * 登录系统类型-前台
     */
    public static final String LOGIN_TYPE_WEB = "WEB";

    /**
     * 当前记录起始索引
     */
    public static final String PAGE_NUM = "pageNum";

    /**
     * 每页显示记录数
     */
    public static final String PAGE_SIZE = "pageSize";

    /**
     * 排序列
     */
    public static final String ORDER_BY_COLUMN = "orderByColumn";

    /**
     * 排序的方向 "desc" 或者 "asc".
     */
    public static final String IS_ASC = "isAsc";

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 验证码有效期（分钟）
     */
    public static final long CAPTCHA_EXPIRATION = 2;

    /**
     * 搜索关键字记录有效期（分钟）
     */
    public static final long KEYWORD_EXPIRATION_DAY_MINUTES = 1440;

    /**
     * 参数管理 cache key
     */
    public static final String SYS_CONFIG_KEY = "sys_config:";

    /**
     * 字典管理 cache key
     */
    public static final String SYS_DICT_KEY = "sys_dict:";

    /**
     * 关键字key
     */
    public static final String KEY_WORD_KEY = "bl_key_word:";

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";

    /**
     * 定时任务白名单配置（仅允许访问的包名，如其他需要可以自行添加）
     */
    public static final String[] JOB_WHITELIST_STR = { "com.lemon" };

    /**
     * 定时任务违规的字符
     */
    public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
            "org.springframework", "org.apache", "com.lemon.common.core.utils.file" };

    /**
     * 删除状态-未删除
     */
    public static final String DEL_FLAG_NO = "0";

    /**
     * 删除状态-删除
     */
    public static final String DEL_FLAG_YES = "1";

    /**
     * 文件存储位置 - minio
     */
    public static final String FILE_STORAGE_PLACE_MINIO = "MINIO";

    /**
     * 文件存储位置 - 本地
     */
    public static final String FILE_STORAGE_PLACE_LOCAL = "LOCAL";

    /**
     * 文件存储位置 - 七牛云
     */
    public static final String FILE_STORAGE_PLACE_QINIU = "QINIU";

    /**
     * 文件存储位置 - FASTDFS
     */
    public static final String FILE_STORAGE_PLACE_FASTDFS = "FASTDFS";

    /**
     * 字符串0
     */
    public static final String STR_ZERO = "0";

    /**
     * 字符串1
     */
    public static final String STR_ONE = "1";

    /**
     * 数字2
     */
    public static final String STR_TWO = "2";

    /**
     * 数字3
     */
    public static final String STR_THREE = "3";

    /**
     * 数字4
     */
    public static final String STR_FOUR = "4";

    /**
     * 字符串/
     */
    public static final String STR_SLASH = "/";

    /**
     * 分号
     */
    public static final String STR_SEMI = ";";

    /**
     * 逗号
     */
    public static final String STR_COMMA = ",";

    /**
     * 数子0
     */
    public static final Integer NUM_ZERO = 0;

    /**
     * 数子1
     */
    public static final Integer NUM_ONE = 1;

    /**
     * 数字2
     */
    public static final Integer NUM_TWO = 2;

    /**
     * 数字3
     */
    public static final Integer NUM_THREE = 3;

    /**
     * 文件后最
     */
    public static final String FILE_EXT_PNG = "png";

}
